Recently, MEMS devices, which integrate various functions in mechanical, electronic, optical and chemical field by using a micro-fabrication technology or the like, are attracting attention. As examples of MEMS device that have been in practical use so far, there are various sensors such as an acceleration sensor, a pressure sensor, an air flow sensor, and the like, which are used in an automobile or a medical field. In particular, MEMS devices are applied to a print head used in an inkjet printer, a micro mirror array used in a reflective type projector, or other various actuators. Besides, MEMS devices are also used as, for example, a protein analysis chip (so-called a protein chip), a DNA analysis chip, or the like in the field of chemical synthesis, bio-analysis, or the like.
Meanwhile, since the MEMS devices are very fine microstructures, it is important to detect defects such as foreign substances, flaws or the like present on the external appearances of the MEMS devices in a manufacturing process thereof. Conventionally, a visual inspection of the MEMS devices has been manually carried out by using a microscope. However, such inspection takes a lot of time and may cause a determination error because the inspection is carried out with naked eyes of an inspector.
Here, as an example of a technology for automating the visual inspection, disclosed in Patent Document 1 is a method for determining whether an inspection target object is normal or abnormal by capturing images of a plurality of normal products among inspection target objects by using, e.g., a CCD (Charge Coupled Device) camera or the like; storing them in a memory as a plurality of normal product images; calculating an average and a standard deviation of luminance values of pixels at the same position on the respective normal product images after performing position alignment of each normal product image; and then comparing the calculated average and standard deviation of the luminance value with a luminance value of each pixel on an image of an inspection target object.
Further, disclosed in Patent Document 2 is a method for detecting a pattern defect in a pattern inspection of a circuit board, a printed object or the like, wherein the method involves the steps of: creating reference image data to be used as a standard of normal products by way of capturing images of a plurality of reference patterns, storing the respective reference pattern images, aligning the position of each respective reference pattern, performing a calculation for obtaining an average value or a median value between the respective image data for every pixel, and creating the reference image data capable of being used as a proper standard by excluding highly deviated data or abnormal values; and then comparing the reference image data with inspection target image data.    Patent Document 1: Japanese Patent Laid-open Publication No. 2005-265661 (for example, FIG. 1)    Patent Document 2: Japanese Patent Laid-open Publication No. H11-73513 (for example, paragraph [0080])    Patent Document 3: Japanese Patent Laid-open Publication No. 2000-180377 (for example, paragraphs [0010]˜[0028])